package com.imooc.distributedemo.leetcode;

import java.util.Arrays;

public class UnionArray {
    public static void merge(int[] nums1, int m, int[] nums2, int n) {
        for(int i=0;i!=n;++i){
            nums1[m+i]=nums2[i];
        }
        Arrays.sort(nums1);
        System.out.println(nums1);
    }

    public static void main(String[] args) {
        int[] nums1 = {1,2,3,9,11,22,222};
        int m = 7;
        int[] nums2 = {4,12,99,119,1331};
        int n = 5;
        merge(nums1,m,nums2,n);
        // System.out.println(nums1);
    }
}
